-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails 7 compatiblity and rebranding #1
Conversation
avonderluft
commented
Nov 16, 2024
- update code, config, and tests for Rails 7
- add github actions workflow for CI
- Rails 5 no longer supported
- rubocop config updated, some linting
- add markdown option to admin/snippet
- add image, audio, and navigation tags
- ensure page reorder functions correctly
- Gem build tested locally, successfully ran on a new project
- update code, config, and tests for Rails 7 - add github actions workflow for CI - Rails 5 no longer supported - rubocop config updated, some linting - add markdown option to admin/snippet - add image, audio, and navigation tags - ensure page reorder functions correctly - Gem build tested locally, successfully ran on a new project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only found minor issues. Nothing blocking.
## Installation | ||
|
||
Add gem definition to your Gemfile: | ||
|
||
```ruby | ||
gem "comfortable_mexican_sofa", "~> 2.0.0" | ||
gem "comfortable_media_surfer", "~> 3.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to start at v3 or revert back to v1 since the name has changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm leaving that decision to @justin808
def comfy_paginate(scope, per_page: 50) | ||
if defined?(WillPaginate) | ||
scope.paginate(page: params[:page], per_page: per_page) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for the record: Why remove support for WillPaginate
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Judahmeek - it had to do with Rails 7 compatibility, and I was being lazy. We can re-add in a future release if there's a demand for it.
---------------------------- | ||
IF YOU ARE ON RAILS 6.x | ||
---------------------------- | ||
and encounter errors referencing webpacker: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this say Shakapacker
instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave that to @justin808 I think in general we're moving on from Rails 6 and webpacker anyway.
) | ||
assert_equal '{{ cms:page_file_link test, filename: "default.jpg", as: image }}', actual | ||
end | ||
|
||
def test_cms_file_link_tag | ||
actual = cms_file_link_tag(@file) | ||
assert_equal "{{ cms:file_link 593363170, as: image }}", actual | ||
assert_equal '{{ cms:image default file }}', actual |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting test change for follow-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't remember details, except that this was to fix failing tests with Rails 7
|
||
assert_no_difference -> { Comfy::Cms::Snippet.count } do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting that assert_no_difference
was removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same. Fixing failing tests with Rails 7
assert_equal 'Test Snippet', snippet.label | ||
assert_equal 'test', snippet.identifier | ||
assert_equal 'Test Content', snippet.content | ||
assert_equal 2, snippet.position |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noting that snippet position changed.
If I had really been paying attention, then I would already know the reason why. 😂
@avonderluft and @Judahmeek please merge when you guys are ready. |
@justin808 - I'm going take a little time to go over @Judahmeek 's comments, and likely make adjustments accordingly before I merge. On version number, I was thinking 3.0.0 to show a new release, but also indicate continuity with ComfyMex, whose last release is 2.0.19. If you'd rather go with 1.0.0 let me know before I merge. |